//此处放注册界面API接口，编写者：@3188066816
import axios from 'axios';

const apiClient = axios.create({
    //测试用后端路径，记得改
    baseURL: 'http://localhost:8000/student/',
    headers: {
        'Content-Type': 'application/json',
    },
});

export default {
    //从后端获取全部学生信息的方法
    getAll(){
        return apiClient.get('get_all/');
    },
    //删除指定学生的方法
    del_one(student_id){
        return apiClient.post('del_one/',{
            type:"del",
            del_id:student_id
        })
    },
    //加一条
    add_one(formData){
        return apiClient.post('add_one/',formData)
    },
    updata_one(formData){
        return apiClient.post('updata_one/',formData)
    },
    getClassesForm(){
        return apiClient.get('get_class_form/');
    },
    search(in1,in2,in3){
        return apiClient.post('search/',{
            college_name:in1,
            class_name:in2,
            student_id:in3
        })
    }
};